<?php
//后台登录 page
Route::get('/','admin/login/login')->name('admin.login');
//后台登录action
Route::post('/','admin/login/doLogin')->name('admin.doLogin');
Route::get('login/verify','admin/Login/verify')->name('login.verify');
Route::get('page404','admin/Error/page404')->name('404');

//关系导图页面
Route::get('map/user','user/RelationShip/map')->name('user.relation.map');
//数据
Route::get('relation_map','user/RelationShip/createRelationMap')->name('relation_map');

Route::group('admin',function(){
    //首页
    Route::get('index','admin/Index/index')->name('admin.index');
    /*系统设置*/
    //菜单列表
    Route::get('menu','admin/Menu/index')->name('admin.menu.index');
    //菜单创建page
    Route::get('menu/create/:pid','admin/Menu/create')->pattern(['pid'=>'\d+'])->name('admin.menu.create');
    //菜单创建 action
    Route::post('menu/store','admin/Menu/store')->name('admin.menu.store');
    //菜单更新page
    Route::get('menu/:id','admin/Menu/edit')->pattern(['id'=>'\d+'])->name('admin.menu.edit');
    //菜单更新 action
    Route::put('menu/:id','admin/Menu/update')->name('admin.menu.update');
    //删除
    Route::delete('menu/:id','admin/Menu/delete')->name('admin.menu.delete');
    //意见反馈
    Route::get('feedback','admin/OpinionFeedback/index')->name('admin.feedback');
    //反馈详情
    Route::get('feedback/detail','admin/OpinionFeedback/detail')->name('admin.feedback.detail');
    //好友关系名列表
    Route::get('relation','admin/UserRelation/index')->name('admin.relation.index');
    Route::get('relation/create','admin/UserRelation/create')->name('admin.relation.create');
    Route::post('relation/store','admin/UserRelation/store')->name('admin.relation.store');
    Route::get('relation/:id','admin/UserRelation/edit')->name('admin.relation.edit');
    Route::put('relation/:id','admin/UserRelation/update')->name('admin.relation.update');
    Route::delete('relation/:id','admin/UserRelation/delete')->name('admin.relation.delete');
    //评价标签
    Route::get('tag','admin/Tag/index')->name('admin.tag.index');
    Route::get('tag/create','admin/Tag/create')->name('admin.tag.create');
    Route::post('tag/store','admin/Tag/store')->name('admin.tag.store');
    Route::get('tag/:id','admin/Tag/edit')->name('admin.tag.edit');
    Route::put('tag/:id','admin/Tag/update')->name('admin.tag.update');
    //用户管理员的数据操作
    Route::get('user','admin/AdminUser/index')->name('admin.user.index');
    Route::get('user/create','admin/AdminUser/create')->name('admin.admin_user.create');
    Route::post('user/create','admin/AdminUser/create')->name('admin.admin_user.create');
    Route::get('user/edit/:id','admin/AdminUser/edit')->pattern(['id'=>'\d+'])->name('admin.admin_user.edit');
    Route::put('user/:id','admin/AdminUser/update')->name('admin.admin_user.update');
    Route::delete('user/:id','admin/AdminUser/delete')->name('admin.admin_user.delete');
    //用户组角色的数据操作
    Route::get('usergroup','admin/AuthGroup/index')->name('admin.auth_group.index');
    Route::get('usergroup/create','admin/AuthGroup/create')->pattern(['pid'=>'\d+'])->name('admin.auth_group.create');
    Route::post('usergroup/add','admin/AuthGroup/add')->name('admin.auth_group.add');
    Route::get('usergroup/:id','admin/AuthGroup/edit')->pattern(['id'=>'\d+'])->name('admin.auth_group.edit');
    Route::put('usergroup/:id','admin/AuthGroup/update')->name('admin.auth_group.update');
    Route::get('logout','admin/login/logout')->name('admin.login.logout');
    Route::delete('usergroup/:id','admin/AuthGroup/delete')->name('admin.auth_group.delete');
    Route::post('usergroup/status','admin/AuthGroup/status')->name('admin.auth_group.status');
    //个人资料的修改
    Route::get('adminUser/profile','admin/AdminUser/profile')->name('admin.admin_user.profile');
    Route::post('adminUser/profile_update/:id','admin/AdminUser/profile_update')->name('admin.admin_user.profile_update');
//    //跑男所属企业的数据操作
//    Route::get('company','admin/UserProfile/index')->name('admin.user_profile.index');
//    Route::post('company/edit_status','admin/UserProfile/edit_status')->name('admin.user_profile.edit_status');
//    //物品信息的数据操作
//    Route::get('article','admin/Article/index')->name('admin.article.index');
//    Route::get('article/create','admin/Article/create')->name('admin.article.create');
//    Route::post('article/add','admin/Article/add')->name('admin.article.add');
//    Route::get('article/edit/:id','admin/Article/edit')->pattern(['id'=>'\d+'])->name('admin.article.edit');
//    Route::put('article/:id','admin/Article/update')->name('admin.article.update');
//    Route::delete('article/:id','admin/Article/delete')->name('admin.article.delete');
//    //订单数据的处理
//    Route::get('order','admin/Order/index')->name('admin.order.index');
//    //手机信息的数据处理
//    Route::get('phone','admin/Phone/index')->name('admin.phone.index');
//    Route::get('phone/create','admin/Phone/create')->name('admin.phone.create');
//    Route::post('phone','admin/Phone/add')->name('admin.phone.add');
//    Route::get('phone/edit/:id','admin/Phone/edit')->pattern(['id'=>'\d+'])->name('admin.phone.edit');
//    Route::put('phone/:id','admin/Phone/update')->name('admin.phone.update');
//    Route::delete('phone/:id','admin/Phone/delete')->name('admin.phone.delete');

    //配送规则
    Route::get('delivery_rule','admin/DeliveryRule/index')->name('admin.delivery_rule');
    //配送规则
    Route::post('delivery_rule/create','admin/DeliveryRule/create')->name('admin.delivery_rule.create');

    //上传图片 page demo
    Route::get('upload','admin/Order/uploadImage')->name('admin.upload');
    //上传图片 action
    Route::post('upload','admin/Order/doUploadImage')->name('image.upload');
    //富文本编辑器
    Route::get('editor','admin/Order/editor')->name('admin.editor');
    Route::post('editor','admin/Order/doEditor')->name('do.editor');

})->middleware('CheckLogin');
